<%= error_messages_for "user" %>

<div class="simple_form">
<%= form_tag %>
 <div class="form_item">
   <label>Username</label>
   <%= text_field(:user, :username, :size => 40) %>
 </div>
 <div class="form_item">
  <label>Email</label>
   <%= text_field(:user, :email, :size => 40) %>
 </div>
 <div class="form_item">
  <label>Password</label>
  <%= password_field(:user, :password, :size => 40) %>
 </div>
 <div class="form_item">
  <label>Retype Password</label>
  <input type="password" name="retype_password" size="40" />
 </div>
 <div class="form_item">
  <label>First name</label>
  <%= text_field(:user, :first_name, :size => 40) %>
 </div>
 <div class="form_item">
  <label>Last name</label>
  <%= text_field(:user, :last_name, :size => 40) %>
 </div>
 <div class="form_item">
  <label>Address</label>
  <%= text_area(:user, :address, :cols => 45, :rows => 4) %>
 </div> 
 <div class="form_item">
  <label>Phone</label>
  <%= text_field(:user, :phone, :size => 40) %>
 </div>
 <div class="form_item">
  <label>City</label>
  <%= text_field(:user, :city, :size => 40) %>
 </div>
 <div class="form_item">
  <label>State</label>
  <%= text_field(:user, :state, :size => 40) %>
 </div>
 <div class="form_item">
  <label>Country</label>
  <%= text_field(:user, :country, :size => 40) %>
 </div>
 <% if @action && @action != 'my_account' %>
     <div class="form_item">
      <label>Rights</label>
      <%= select(:user,:rights,%w{ManageAll ManageProjectsAndTasks ManageTasks}) %>
     </div>
 <% end %>
 <% if @action && (@action == 'add_user' || @action = 'my_account') %>
   <input type="hidden" name="user[is_active]" value="1" />
 <% else %>  
   <div class="form_item">
    <label><%= check_box(:user,:is_active) %>Is active</label>
   </div>
 <% end %>
 <div class="form_item submit">
  <input type="hidden" name="form_submitted" value="1" />
  <input type="submit" name="submit" value="Save" />
 </div>
<%= end_form_tag %>
</div>
